package cn.codergege.shiro.chapter6.service;

import cn.codergege.shiro.chapter6.model.Role;

public interface RoleService {

    public Role createRole(Role role) throws Exception;
    public void deleteRole(Long roleId) throws Exception;

    /**
     * 添加角色-权限之间关系
     * @param roleId
     * @param permissionIds
     */
    public void correlationPermissions(Long roleId, Long... permissionIds) throws Exception;

    /**
     * 移除角色-权限之间关系
     * @param roleId
     * @param permissionIds
     */
    public void uncorrelationPermissions(Long roleId, Long... permissionIds) throws Exception;

}
